home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / dink100.zip / DINKEY.DOC < prev    next >
Text File  |  1990-04-26  |  5KB  |  149 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.                                Dinkey v1.00
  7.  
  8.                     Copyright 1990 by The Thin White Duke.
  9.  
  10.                          Batch File Input Command.
  11.  
  12.  
  13.        ----------
  14. i      DISCLAIMER
  15.        ----------
  16.  
  17.  
  18.        This program comes with no warranty, expressed or otherwise.  Use
  19.        of this program is at your own risk.  But you have nothing to
  20.        fear from it, anyway.
  21.  
  22.        This program is Shareware.  Information on Registering the product
  23.        is located at the end of this file.
  24.  
  25.  
  26.        ---------------
  27.        What is Dinkey?
  28.        ---------------
  29.  
  30.        Dinkey is a program to be used in batch programs for receiving input
  31.        from the user.  It returns a DOS Errorlevel that can be used by your
  32.        batch programs for things like simple menus.
  33.  
  34.  
  35.        -----------
  36.        What to do.
  37.        -----------
  38.  
  39.        Dinkey returns a DOS Errorlevel based on the user inputed key.  When
  40.        you setup Dinkey in your batch program, you must tell it what the
  41.        valid keys for input are.  A common selection is "YN" for Yes or No
  42.        type questions.  For example:
  43.  
  44.        DINKEY "YN"
  45.  
  46.        This will allow the user to input a 'Y', 'y', 'N', or 'n' (or the
  47.        [ESC] or [ENTER] keys).
  48.  
  49.        If the user hits a 'Y', Dinkey will return an Errorlevel of 1, since
  50.        the 'Y' is in the first position of the list of characters.
  51.  
  52.        If the user had entered a 'N', Dinkey would have returned a 2, because
  53.        of the 'N' being in the second position.
  54.  
  55.        The [ESC] and [ENTER] keys return the default value of 1.
  56.  
  57.        Dinkey also has an optional timeout parameter.  If you specify a
  58.        a number of seconds after the list of valid characters, Dinkey will
  59.        wait a maximum of that many seconds before exiting with the default
  60.        value of 1.  For example:
  61.  
  62.        DINKEY "ABCD" 10
  63.  
  64.        This allows the user to enter a letter from A to D, within 10 seconds.
  65.        If 10 seconds pass, Dinkey will return an Errorlevel of 1 (which in
  66.        this particular case corosponds to the 'A').  If the user hits an
  67.        invalid key, such as 'Z', Dinkey will start the timeout timer over
  68.        again, giving the user another 10 seconds to select.
  69.  
  70.  
  71.        -----------
  72.        An Example.
  73.        -----------
  74.  
  75.        The following batch program will prompt the user to select a disk drive
  76.        to use, and will then do a directory of it.
  77.  
  78.                Echo off
  79.                cls
  80.                echo Which drive do you want to use?  Enter A or C.
  81.                echo.
  82.                dinkey "CA" 20
  83.                IF ERRORLEVEL 2 GOTO ADRIVE
  84.                IF ERRORLEVEL 1 GOTO CDRIVE
  85.                :ADRIVE
  86.                a:
  87.                dir
  88.                echo Now Logged Onto A:
  89.                GOTO END
  90.                :CDRIVE
  91.                c:
  92.                dir
  93.                echo Now Logged Onto C:
  94.                :END
  95.  
  96.        If the user selects 'C', or hits [ESC] or [ENTER], the Dinkey will
  97.        return a 1 and will cause the batch program to jump to the label
  98.        line :CDRIVE.  If the user hits an 'A', the batch program will jump
  99.        to :ADRIVE.  If the user waits too long (over 20 seconds), the batch
  100.        file will default to the C: drive.
  101.  
  102.        Note that you must check for the Errorlevels in order from highest
  103.        to lowest.  See your DOS manual for more information on batch files.
  104.  
  105.  
  106.        --------------------------
  107.        What Is Dinkey written In?
  108.        --------------------------
  109.  
  110.        DD is written in Borland's Turbo C v1.5.
  111.  
  112.        The source code can be obtained by sending $5.00 US and a disk to
  113.        the address at the end of this file.
  114.  
  115.  
  116.        ------------------
  117.        Where To Register.
  118.        ------------------
  119.  
  120.        Non-Corporate users may register for $5.00 ($8.00 to have the
  121.        current version mailed to you).
  122.  
  123.        Site licenses may be obtained for the following:
  124.  
  125.         1 to 10 users:          $15.00
  126.        11 to 30 users:          $25.00
  127.        31 and greater:          $45.00
  128.  
  129.        Source code costs $5.00 separate, and is free with a Site
  130.        License.
  131.  
  132.        Send check Payable to M. F. Oryl Jr. at the following address.
  133.  
  134.        M. F. Oryl Jr.
  135.        375 Allentown Rd.
  136.        Souderton, PA  18964
  137.  
  138.        If you have any questions or comments, or <shudder> 'bug'
  139.        reports, please call me at The Fire Command Center BBS and leave
  140.        me feedback or write me a letter through good ol' US mail.
  141.  
  142.        The Fire Command Center
  143.        2 1 5 / 3 6 8 - 6 3 9 7
  144.        300/1200/2400bps - 24hr
  145.  
  146.  
  147.        -=>TTWD
  148.  
  149.